﻿<!DOCTYPE html>
<html lang="en">
<#include "../include/resource-head.ftl"/>
<body>
<#include "../include/common-top.ftl"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
    <#include "../include/common-menu.ftl"/>
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="form-search">
                            <form role="form" class="form-inline clearfix"  id="form2"  action="">
                                <div class="input-group col-xs-2">
                                    <span class="input-group-addon">档案名</span>
                                    <input type="text" class="form-control" name="docname" value="${docname!}">
                                </div>

                                <div class="input-group col-xs-2">
                                    <span class="input-group-addon">档案编号</span>
                                    <input type="text" class="form-control" name="docno" value="${docno!}">
                                </div>


                                <div class="input-group col-xs-2">
                                    <span class="input-group-addon">教师名</span>
                                    <input type="text" class="form-control" name="techername" value="${techername!}">
                                </div>
                            </form>
                            <div class="form-tool btn-group">
                                <button class="btn btn-sm btn-success" form="form2">
                                    <i class="icon-search"></i>搜索
                                </button>
                            </div>
                        </div>
                        <div class="table-responsive">
                            <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>文档名</th>
                                    <th>文档编号</th>
                                    <th>文档分类</th>
                                    <th>申请教师</th>
                                    <th>状态</th>
                                    <th>备注</th>
                                    <th>添加时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <#list pageInfo.list as item>
                                <tr>
                                    <td>${item.docname!}</td>
                                    <td>${item.docno!}</td>
                                    <td>${item.categoryname!}</td>
                                    <td>${item.teachername!}</td>
                                    <td>${item.status!}</td>
                                    <td>${item.remark!}</td>
                                    <td>${item.addtime?string('yyyy-MM-dd HH:mm:ss')}</td>
                                    <td>
                                        <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                            <a onclick="verify('${item.id}')" class="btn btn-xs btn-info"
                                               href="#">审批</a>

                                        </div>
                                    </td>
                                </tr>
                                </#list>
                                </tbody>
                            </table>
                        <#include "../include/table-page.ftl"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div id="verify" class="modal fade" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">审批</h4>
                </div>
                <div class="modal-body">
                    <form name="form" id="form3" class="form-horizontal" method="post" action="/order/verify">
                        <input type="hidden" name="id" id="docid">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">审核</label>
                            <div class="col-sm-10">
                                <input type="radio" name="status" checked value="通过"> 通过
                                <input type="radio" name="status" value="不通过"> 不通过
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">审核意见</label>
                            <div class="col-sm-10">
                                <input type="text" required class="form-control" name="remark">
                            </div>
                        </div>

                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    <button type="submit" form="form3" class="btn btn-primary">修改</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

</body>
<#include "../include/resource-script.ftl"/>
<script>
    function verify(id) {
        $("#docid").val(id);
        $("#verify").modal("show");
    }

</script>
</html>

